package com.zr.daoimpl;

import org.springframework.stereotype.Repository;

import com.zr.dao.AddorderdaoCH;
import com.zr.model.Order;
@Repository("AddorderdaoCH")
public class AddorderdaoimplCH extends BaseDaOImpl implements AddorderdaoCH{

	@Override
	public boolean addorder(String orSenderName, String orSenderPhone, String orSenderCompanyPhone, String orSenderAddr,
			String orRecipientName, String orRecipientPhone, String orRecipientCompanyPhone, String orRecipientAddr,String orItemName,int orItemNumber,String orPaymentMethod) {
		// TODO Auto-generated method stub
	//	String sql="insert into order (orSenderName,orSenderPhone,orSenderCompanyPhone,orSenderAddr,orRecipientName,orRecipientPhone,orRecipientCompanyPhone,orRecipientAddr,orItemName,orItemNumber,orPaymentMethod) values () ";
		Order or=new Order();
		boolean flag=true;
		or.setOrSenderName(orSenderName);
		or.setOrSenderPhone(orSenderPhone);
		or.setOrSenderCompanyPhone(orSenderCompanyPhone);
		or.setOrSenderAddr(orSenderAddr);
		or.setOrRecipientName(orRecipientName);
		or.setOrRecipientPhone(orRecipientPhone);
		or.setOrRecipientCompanyPhone(orRecipientCompanyPhone);
		or.setOrRecipientAddr(orRecipientAddr);
		or.setOrItemName(orItemName);
		or.setOrItemNumber(orItemNumber);
		or.setOrPaymentMethod(orPaymentMethod);
		this.getCurrentSession().save(or);
		return flag;
			
	}

}
